package com.indusfo.spc.controller;


import com.indusfo.spc.pojo.DeviceTypeMaintain;
import com.indusfo.spc.service.DeviceTypeMaintainService;
import com.indusfo.spc.vo.JSONObject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * @ClassName DeviceTypeMaintainController
 * @Description 设备类型点检项目
 * @Author louk
 * @Date 2019/12/11 9:16
 * @Version 1.0
 */
@Controller
@RequestMapping("/service/deviceTypeMaintain")
public class DeviceTypeMaintainController {

    @Resource
    DeviceTypeMaintainService deviceTypeMaintainService;

    /**
     * 批量新增设备类型保养项目明细
     * @param maintainIds
     * @param deviceTypeId
     * @return
     */
    @ResponseBody
    @RequestMapping("updateDeviceTypeMaintainList")
    JSONObject updateDeviceTypeMaintainList(Integer[] maintainIds, Integer deviceTypeId){
            return deviceTypeMaintainService.updateDeviceTypeMaintainList(maintainIds,deviceTypeId);
    }

    /**
     * 删除设备类型保养项目明细
     * @param deviceTypeMaintainId
     * @return
     */
    @ResponseBody
    @RequestMapping("defineDeviceTypeMaintain")
    JSONObject defineDeviceTypeMaintain(Integer deviceTypeMaintainId,Integer dataState){
        return deviceTypeMaintainService.defineDeviceTypeMaintain(deviceTypeMaintainId,dataState);
    }
    /**
     * 批量删除设备类型保养项目明细
     * @param deviceTypeMaintainIds
     * @return
     */
    @ResponseBody
    @RequestMapping("defineDeviceTypeMaintainList")
    JSONObject defineDeviceTypeMaintainList(Integer[] deviceTypeMaintainIds,Integer dataState){
        return deviceTypeMaintainService.defineDeviceTypeMaintainList(deviceTypeMaintainIds,dataState);
    }

    /**
     * 查询设备类型保养项目明细
     * @param deviceTypeMaintain
     * @return
     */
    @ResponseBody
    @RequestMapping("queryDeviceTypeMaintainList")
    JSONObject queryDeviceTypeMaintainList(DeviceTypeMaintain deviceTypeMaintain){
        return deviceTypeMaintainService.queryDeviceTypeMaintainList(deviceTypeMaintain);
    }
}
